import Mock from 'mockjs';

let object = [{
		key: "/sb/info",
		method: "get",
		data: Mock.mock({
			'STATUS': "SUCCESS",
			'DATA': {
				"sbid|4": /[A-Z][a-z][0-9][0-9]/,
				"name": "@csentence(5)",
				"roomid|4":/[A-Z][a-z][0-9][0-9]/,
				"cover": "@image('200x200', '#4A7BF7')",
				"ms": "哇，好白~",
				
				"cj":"@csentence(5)", //设备生产厂家
				"price":"@natural(60, 5000)",//设备价值
				"buyday":"@date",//购买日期
				
			}
		})
	},

	{
		key: "/sb/page",
		method: "get",
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {
					'current': 0,
					'size': 10,
					'pages': 6,
					'total': 55,
					"records|10": [{
						"sbid|4": /[A-Z][a-z][0-9][0-9]/,
						"name": "@csentence(5)",
						"roomid|4":/[A-Z][a-z][0-9][0-9]/,
						"cover": "@image('200x200', '#4A7BF7')",
						"ms": "哇，好白~",
						
						"cj":"@csentence(5)", //设备生产厂家
						"price":"@natural(60, 5000)",//设备价值
						"buyday":"@date",//购买日期
					}]
				}
			});
		}
	},
	{
		key: "/sb/info",
		method: "delete",
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': "",
			});
		}
	},
	{
		key: "/sb/info",
		method: "put",
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': "",
			});
		}
	},
	{
		key: "/sb/info",
		method: "post",
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': "",
			});
		}
	},
];

export default object;
